package com.zhenmyan.secdeal.annotation;

import com.zhenmyan.secdeal.pojo.User;

/**
 * description:
 *
 * @author 颜真明
 * @date 2023/5/16  2:46
 */
public class UserContext {

    private static ThreadLocal<User> userThreadLocal = new ThreadLocal<>();

    public static void setUser(User tUser) {
        userThreadLocal.set(tUser);
    }

    public static User getUser() {
        return userThreadLocal.get();
    }
}